<template>
    <div>
        <el-dialog title="新增订单" :visible.sync="dialogVisible" width="60%">
            <el-form ref="form" :model="form" label-width="80px">
                <el-form-item label="车牌号码">
                    <el-input v-model="form.licensePlate"></el-input>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible = false">取 消</el-button>
                <el-button type="primary" @click="makeAddSure">确 定</el-button>
            </span>
        </el-dialog>
        <el-button type="primary" @click="add">新增</el-button>
        <el-button type="danger">删除</el-button>
        <div style="display:inline-block;margin:0 20px">
            <slot name="input"></slot>
        </div>
        <el-button type="primary" style="background:#007761" icon="el-icon-search">搜索</el-button>
        <el-button>重置</el-button>
    </div>
</template>
<script>
import API from '../api'
import { MessageBox } from 'element-ui'
export default {
    created(){
    },
    props:['pileIds'],
    watch:{
        pileIds(){
            
        }
    },
    data() {
        return {
            form:{},
            dialogVisible:false
        }
    },
    methods:{
        add(){
            this.dialogVisible=true
        },
        makeAddSure(){

        },
        async del() {
            await MessageBox.confirm("是否确认删除?", "警告", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            })
            await API.delPileData({ pileIds: this.pileIds })
            this.$message.success('删除成功')
            this.pileIds = []
            this.getPileData()
        },
    }
}
</script>